#ifndef MIPSINST_H
#define MIPSINST_H

#include "crossbit/common.h"

namespace crossbit
{
		struct MIPSInstFmt
		{
				XTInt32 inst;
		};

		union MIPSOpsFmt
		{
				XTInt32 w;

				struct
				{
						unsigned func : 6;
						unsigned ze : 5;
						unsigned rd : 5;
						unsigned rt : 5;
						unsigned rs : 5;
						unsigned op : 6;
				};

				struct
				{
						unsigned offset : 16;
						unsigned bl : 5;
						unsigned rrs : 5;
						unsigned regimm : 6;
				};
		};

		/* 
		   Defunc deSpecial; 
		   Defunc deRegimm;
		   Defunc deJ;
		   Defunc deJAL;
		   Defunc deBEQ;
		   Defunc deBNE;
		   Defunc deBLEZ;
		   Defunc deBGTZ;
		   Defunc deADDI;
		   Defunc deADDIU;
		   Defunc deSLTI;
		   Defunc deANDI;
		   Defunc deORI;
		   Defunc deXORI;
		   Defunc deLUI;
		   Defunc deCOP0;
		   Defunc deCOP1;
		   Defunc deCOP2;
		   Defunc deCOP1X;
		   Defunc deBEQL;		//This instruction will be removed from a future architecture
		   Defunc deBNEL;
		   Defunc deBLEZL;
		   Defunc deBGTZL;
		   Defunc deSpecial2;
		   Defunc deJALX;
		   Defunc deSpecial3; 
		   Defunc deLB;
		   Defunc deLH;
		   Defunc deLWL;
		   Defunc deLW;
		   Defunc deLBU;
		   Defunc deLHU;
		   Defunc deLWR;
		   Defunc deSB;
		   Defunc deSH;
		   Defunc deSWL;
		   Defunc deSW;
		   Defunc deSWR;
		   Defunc deCACHE;
		   Defunc deLL;
		   Defunc deLWC1;
		   Defunc deLWC2;
		   Defunc dePREF;
		   Defunc deLDC1;
		   Defunc deLDC2;
		   Defunc deSC;
		   Defunc deSWC1;
		   Defunc deSWC2;
		   Defunc deSDC1;
		   Defunc deSDC2;
		 */
}

#endif	//MIPSINST_H
